package com.lhd.shop.controller;

import com.lhd.shop.service.FrontService;
import dto.UserDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import vo.ResponseData;

import java.util.List;

/**
 * @program: sporadic
 * @description:
 * @author: LHD   QQ:1727865856
 * @create: 2019-11-26 12:18
 **/
@RestController
public class UserController {

    @Autowired
    private FrontService frontService;

    @GetMapping("/selAllorByPhone")
    public ResponseData<List<UserDTO>> query(@RequestParam(value = "phone",required = false)String phone){
        ResponseData<List<UserDTO>> listResponseData = frontService.selAllUser(phone);
        System.out.println(listResponseData.getBody());
        return  listResponseData;
    }
}
